package msu.ml.data.level2;

import java.util.*;

/**
 * Contains scan/angle details for
 * Volume Coverage Pattern 121
 *
 * @author Reginald M Mead
 * @version 1.0
 */
public class VolumeCoveragePattern121 extends VolumeCoveragePatternBase
{

	/**
	 * Create a new VolumeCoveragePattern121
	 */
	public VolumeCoveragePattern121()
	{
		float [] angleData =  	{.5f, 1.5f, 2.4f, 3.4f, 4.3f, 6.0f, 9.9f, 14.6f, 19.5f};
		float [] scanAngleData = {.5f, .5f, .5f, .5f, 1.5f, 1.5f, 1.5f, 1.5f, 2.4f, 2.4f, 2.4f, 3.4f, 3.4f, 3.4f, 4.3f, 4.3f, 6.0f, 9.9f, 14.6f, 19.5f};

		initializeAngles(angleData);
		initializeScanAngles(scanAngleData);
	}

	/**
	 * Get the total scan time for one volume
	 * scan using this pattern.
	 *
	 * @return the total time for a volume scan
	 */
	public int getTotalScanTime()
	{
		return 330;
	}

	/**
	 * Returns true if the scan at the specified
	 * angle contains doppler information.
	 *
	 * @param scanIndex index of scan
	 * @return true if scan contains doppler data
	 */
	public boolean isDopplerScan(int scanIndex)
	{
		return scanIndex > 4 || scanIndex == 1 || scanIndex == 2 || scanIndex == 3;
	}

	/**
	 * Returns true if the scan at the specified
	 * angle contains reflectivity information.
	 *
	 * @param scanIndex index of scan
	 * @return true if scan contains reflectivity data
	 */
	public boolean isReflectivityScan(int scanIndex)
	{
		return scanIndex > 5 || scanIndex == 0 || scanIndex == 2 || 
			scanIndex == 3 || scanIndex == 4;
	}

	public String toString()
	{
		return "VCP 121";
	}

}
